package com.unbiz.tuple;

/**
 * @author A N M Bazlur Rahman
 * @since 3/15/15.
 */
final public class Tuple0 extends Tuple<Tuple0> {
  
	Tuple0(){
		
	}
	
    @Override
    public int size() {
        return 0;
    }

    @Override
    public Object apply(int value) {
        throw new IndexOutOfBoundsException();
    }
    

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Tuple0)) return false;
       
        return true;
    }

    @Override
    public int hashCode() {
        return 0;
    }


    @Override
    public String toString() {
        return "()";
    }
    
    public <T> T first(){
    	return null;
    }
    
    @Override
    public Object[] toArray() {		
		return new Object[] {};
	}
}
